package com.assembly.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 平台资源信息表
 * </p>
 *
 * @author 丽人平台-www.assembly.com
 * @since 2021-03-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("assembly_resources")
@ApiModel(value="Resources对象", description="平台资源信息表")
public class Resources implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "资源名称")
    private String resourcesName;

    @ApiModelProperty(value = "父资源ID(0为顶级资源)")
    private String parentId;

    @ApiModelProperty(value = "请求地址")
    private String url;

    @ApiModelProperty(value = "资源类型(1目录，2菜单，3按钮)")
    private Integer type;

    @ApiModelProperty(value = "平台的资源类型（1平台 2B端 3C端）")
    private Integer assemblyType;

    @ApiModelProperty(value = "授权标识符")
    private String code;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    private Date createDate;

    @ApiModelProperty(value = "更新时间")
    private Date updateDate;


    @ApiModelProperty(value = "子菜单集合")
    @TableField(exist = false)
    private List<Resources> children;


}
